package com.wlr.blog.web.common.entity;

import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * website_config
 *
 * @author
 */
@Data
public class WebsiteConfig implements Serializable {
    /**
     * 配置编号
     */
    private Integer id;
    /**
     * 首页banner图
     */
    private String homeCover;
    /**
     * 访问次数
     */
    private Long viewCount;
    /**
     * 部署时间
     */
    private Date deployTime;
    /**
     * 头像
     */
    private String websiteAvatar;

    /**
     * 网站名称
     */
    private String websiteName;

    /**
     * 网站作者
     */
    private String websiteAuthor;

    /**
     * 网站简介
     */
    private String websiteIntro;

    /**
     * 网站通知
     */
    private String websiteNotice;

    /**
     * 网站创建时间
     */
    private Date websiteCreateTime;

    /**
     * 网站备案编号
     */
    private String websiteRecordNo;

    /**
     * 是否开启聊天室
     */
    private Integer isChatRoom;

    /**
     * 是否开启音乐播放器
     */
    private Integer isMusicPlayer;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WebsiteConfig other = (WebsiteConfig) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getWebsiteAvatar() == null ? other.getWebsiteAvatar() == null : this.getWebsiteAvatar().equals(other.getWebsiteAvatar()))
                && (this.getWebsiteName() == null ? other.getWebsiteName() == null : this.getWebsiteName().equals(other.getWebsiteName()))
                && (this.getWebsiteAuthor() == null ? other.getWebsiteAuthor() == null : this.getWebsiteAuthor().equals(other.getWebsiteAuthor()))
                && (this.getWebsiteIntro() == null ? other.getWebsiteIntro() == null : this.getWebsiteIntro().equals(other.getWebsiteIntro()))
                && (this.getWebsiteNotice() == null ? other.getWebsiteNotice() == null : this.getWebsiteNotice().equals(other.getWebsiteNotice()))
                && (this.getWebsiteCreateTime() == null ? other.getWebsiteCreateTime() == null : this.getWebsiteCreateTime().equals(other.getWebsiteCreateTime()))
                && (this.getWebsiteRecordNo() == null ? other.getWebsiteRecordNo() == null : this.getWebsiteRecordNo().equals(other.getWebsiteRecordNo()))
                && (this.getIsChatRoom() == null ? other.getIsChatRoom() == null : this.getIsChatRoom().equals(other.getIsChatRoom()))
                && (this.getIsMusicPlayer() == null ? other.getIsMusicPlayer() == null : this.getIsMusicPlayer().equals(other.getIsMusicPlayer()))
                && (this.getViewCount() == null ? other.getViewCount() == null : this.getViewCount().equals(other.getViewCount()))
                && (this.getDeployTime() == null ? other.getDeployTime() == null : this.getDeployTime().equals(other.getDeployTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getWebsiteAvatar() == null) ? 0 : getWebsiteAvatar().hashCode());
        result = prime * result + ((getWebsiteName() == null) ? 0 : getWebsiteName().hashCode());
        result = prime * result + ((getWebsiteAuthor() == null) ? 0 : getWebsiteAuthor().hashCode());
        result = prime * result + ((getWebsiteIntro() == null) ? 0 : getWebsiteIntro().hashCode());
        result = prime * result + ((getWebsiteNotice() == null) ? 0 : getWebsiteNotice().hashCode());
        result = prime * result + ((getWebsiteCreateTime() == null) ? 0 : getWebsiteCreateTime().hashCode());
        result = prime * result + ((getWebsiteRecordNo() == null) ? 0 : getWebsiteRecordNo().hashCode());
        result = prime * result + ((getIsChatRoom() == null) ? 0 : getIsChatRoom().hashCode());
        result = prime * result + ((getIsMusicPlayer() == null) ? 0 : getIsMusicPlayer().hashCode());
        result = prime * result + ((getViewCount() == null) ? 0 : getViewCount().hashCode());
        result = prime * result + ((getDeployTime() == null) ? 0 : getDeployTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", websiteAvatar=").append(websiteAvatar);
        sb.append(", websiteName=").append(websiteName);
        sb.append(", websiteAuthor=").append(websiteAuthor);
        sb.append(", websiteIntro=").append(websiteIntro);
        sb.append(", websiteNotice=").append(websiteNotice);
        sb.append(", websiteCreateTime=").append(websiteCreateTime);
        sb.append(", websiteRecordNo=").append(websiteRecordNo);
        sb.append(", isChatRoom=").append(isChatRoom);
        sb.append(", isMusicPlayer=").append(isMusicPlayer);
        sb.append(", viewCount=").append(viewCount);
        sb.append(", deployTime=").append(deployTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}